package com.smart.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import com.smart.common.PageInfo;
import com.smart.model.domain.UserIdentificationDO;
import com.smart.model.request.UserIdentificationEquBindRequest;
import com.smart.model.request.UserIdentificationPageRequest;
import com.smart.model.request.UserIdentificationRequest;
import com.smart.model.vo.ProjectUseControlVO;
import com.smart.model.vo.UserIdentificationPageVO;
import com.smart.model.vo.UserIdentificationVO;

/**
 * @author zhanghong
 */
public interface UserIdentificationService extends IService<UserIdentificationDO> {

    /**
     * 根据设备编号查询最新一条识别数据
     * @param equNo
     * @return
     */
     UserIdentificationVO getByEquNo(String equNo);
    /**
     * 新增
     * @param request
     * @return
     */
    JSONObject record(UserIdentificationRequest request);

    /**
     * 分页查询
     * @param request
     * @return
     */
    PageInfo<UserIdentificationPageVO> pageQuery(UserIdentificationPageRequest request);

    /**
     * 查询
     * @param projectId
     * @return
     */
    UserIdentificationPageVO getEquMangeInfoByProjectId(Long projectId);

    /**
     * 绑定设备
     * @param request
     * @return
     */
    Boolean saveEquInfo(UserIdentificationEquBindRequest request);

    /**
     * 清空设备识别信息
     * @param equNo
     * @return
     */
    Boolean clearEquNo(String equNo);

    /**
     * 查询项目开通情况和设备列表
     * @return
     */
    ProjectUseControlVO getOpenInfo();
}
